When processing graphics for visual display, prior to rendering the graphics, the system receives and must compile new vector inputs. This process can be a time consuming step, due to the amount of information which must be compiled. Once all of the input vector information is compiled, a hardware state and shader vector is created and then provided to a graphics processor. The graphics processor utilizes the state and shader vector to produce a visual output.
This graphics processing system can be extremely inefficient when a large input vector needs to be compiled and provided to the processor. Furthermore, to increase optimization for the best performance of the graphics processor, the compiler may require a long compile time to properly compile the large input vector.
In conventional processing systems, it is not uncommon to have the compiler recompiling commonly occurring large input vectors. Recompilation of the same input vector is redundant and wasteful.
FIG. 1 illustrates how a hardware state and shader vector 100 is generated by a compiler 102 in accordance with the prior art system. The compiler 102 receives an abstract state vector, shown generally at 104, which consists of an abstract render state 106, vertex shader programs 108, vertex shader constants 110, pixel shader programs 112 and pixel shader constants 114. The abstract state vector 104 is thereupon provided to the compiler 102 where the compiler compiles the input information, in accordance with well-known compiler techniques. Once the abstract state vector 104 has been compiled by the compiler 102, thereby generating a hardware state and shader vector 100, the hardware state and shader vector 100 is provided to a hardware 116, such as graphics processor or any other suitable hardware as recognized by one skilled in the art.
The compilation process illustrated in FIG. 1 must be executed for every hardware state and shader vector to be provided to the hardware. When the compiler 102 must recompile the abstract state vector 104, this creates an inefficient graphics pre-processing system. Therefore, there currently exists a need for an improved graphics processing unit using state and shader management of hardware state and shader vectors.